<% layout('layout') -%><!--加载全局布局文件-->
<!--NgC div start--->
<div ng-controller="HomeCtrl" class="app-bg-gray">
    <!-- 首页轮播图 -->
    <div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{&quot;directionNav&quot;:false}' >
        <ul class="am-slides">
            <% lbt.forEach(function(item){ %>
            <li>
                <a class="am-block" href="<%= item.get('httpurl') %>"><img src="<%= item.get('fileUrl') %>"></a>
                <!--<div class="am-slider-desc"></div>-->
            </li>
            <% });%>
        </ul>
    </div>
    <!-- 4个功能菜单 -->
    <ul class="am-avg-sm-4 am-thumbnails am-text-center am-link-muted am-text-primary app-margin-2 app-bg-white" data-ng-init="load(<%=signValue.SignState%>,<%=signValue.AllSignDay%>)">
        <li class="am-padding-bottom-0">
            <a class="am-block am-margin-sm" ng-click="sign()" >
                <div style=" position:relative;">
                <img class="am-block" src="/images/home/qd.png" width="100%"/>
                <b style="position: absolute;top: -10px;right: -5px;width: 30px;height: 20px;border-radius: 25px;background-color: red;font-size:xx-small;color:white">new</b>
                </div>
                <p class="am-text-xs am-margin-0" ng-bind="isSignToday | isSign:allSignDay"></p>
            </a>
        </li>
        <li class="am-padding-bottom-0">
            <a href="http://shequ.kdweibo.com/thirdapp/forum/network/55e3af7ee4b09ccc3c1eadc0"
               class="am-block am-margin-sm ">
                <img class="am-block" src="/images/home/social.png" width="100%"/>
                <p class="am-text-xs am-margin-0">社区</p>
            </a>
        </li>
        <li class="am-padding-bottom-0">
            <a href="/classify/proListByCode/grxgq" class="am-block am-margin-sm">
                <img class="am-block" src="/images/home/xgq.png" width="100%"/>
                <p class="am-text-xs am-margin-0">鲜果切</p>
            </a>
        </li>
        <li class="am-padding-bottom-0">
            <a href="/user/chongzhi" class="am-block am-margin-sm">
                <img class="am-block" src="/images/home/yhq.png" width="100%"/>
                <p class="am-text-xs am-margin-0">充值</p>
            </a>
        </li>
    </ul>

    <div class="am-g app-bg-white">
        <div class="am-u-sm-5 app-padding-2">
            <a class="am-block" href="/classify/proListByCode/mrbq">
                <img class=""  src="/images/home/ms10h.png" width="100%" height="100%" />
            </a>
        </div>
        <div class="am-u-sm-7 app-padding-2">
            <a class="am-block am-margin-bottom-xs" href="/classify/proListByCode/grhgz">
                <img class=""  src="/images/home/gzhi.png" width="100%" height="100%" />
            </a>
            <a class="am-block am-margin-top-sm" href="/classify/proListByCode/zs">
                <img class=""  src="/images/home/sxp.png" width="100%" height="100%" />
            </a>
        </div>
    </div>

    <div class="am-container am-padding-0 am-margin-0">
        <% ggw.forEach(function(item){ %>
        <a href="<%= item.get('httpurl') %>" class="am-block am-margin-top-xs">
            <img src="<%= item.get('fileUrl') %>" width="100%" height="100%"/>
        </a>
        <% });%>
    </div>

    <% classify.forEach(function(item){ %>
    <div data-am-widget="list_news" class="am-list-news am-list-news-default app-bg-white am-margin-0 am-padding-xs" >
        <!--列表标题-->
        <div class="am-list-news-hd am-cf am-padding-xs">
            <!--带更多链接-->
            <span class="am-fl am-badge am-badge-warning am-round am-padding-xs am-text-sm am-padding-left-sm am-padding-right-sm"><%= item.title %></span>
            <a href="/classify/proListById/<%= item.id %>" class="am-margin-xs am-fr">
                <span class="am-list-news-more am-fr">更多 &raquo;</span>
            </a>
        </div>

        <div class="am-list-news-bd">
            <ul class="am-list">
                <% item.list.forEach(function(p){ %>
                <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left app-relative">
                    <a ng-href="/detail/<%= p.id %>" class="am-block" >
                    <div class="am-u-sm-5">
                        <img src="<%= JSON.parse(p.get('picurlarray'))[0] %>" width="100%" height="100%" class="am-radius"/>
                    </div>
                    <div class="am-u-sm-7 am-list-main">
                        <h3 class="am-list-item-hd"><%= p.get('name') %></h3>
                        <span class="am-badge am-badge-primary am-radius"><i class="am-icon-tag"></i> <%= p.get('minSpecName') %></span>
                        <div class="am-list-item-text line-clamp app-list-item"><%= p.get('intro') %></div>
                        <div class="am-text-default am-text-danger">￥<%= p.get('minPrice') %></div>
                        <div class="am-text-xs app-color-gray"><%= p.get('commentCount') %>人已评</div>
                    </div>
                    </a>
                    <% if(p.get('name').indexOf('预售') < 0){%>
                    <button class="app-lsit-cart" ng-click='addToCart("<%= p.id%>","<%= p.get('minSpec')%>",1)'></button>
                    <% }%>
                </li>

                <% });%>
            </ul>
        </div>
        <!--更多在底部-->
        <div class="am-list-news-ft">
            <a class="am-list-news-more am-btn am-btn-default am-margin-xs am-radius" href="/classify/productsLimit">查看全部 &raquo;</a>
        </div>
    </div>
    <hr data-am-widget="divider" style="" class="am-divider am-divider-default am-margin-0" />
    <% });%>

</div>

<!---启用底部navbar-->
<% include ../navbar.ejs %>
